.active() {
  font-size: 14px;
  z-index: 1;
  top: -9px;
  color: var(--primary);
  background: #f0f2f7;
}

.input-label {
  position: relative;

  input {
    width: 100%;
    height: 40px;
    border-radius: 20px;
    border: 1px solid #c0ccda;
    box-shadow: 0 1px 1px var(--white_opacity_8);
    color: #484848;
    padding: 0 20px;
    font-size: 16px;
    background: linear-gradient(#f0f2f7, #fff);
    outline: none;
    transition: border-color 0.25s;

    &:focus {
      border-color: var(--primary);

      & + .input-label__tip {
        .active();
      }

      & ~ .input-label__required {
        color: var(--primary);
      }
    }
  }

  &__tip {
    display: flex;
    align-items: center;
    padding-left: 5px;
    font-size: 15px;
    color: #c0c4cc;
    position: absolute;
    left: 17px;
    top: 11px;
    transition: 0.25s;
    pointer-events: none;

    .icon {
      margin-right: 3px;
    }
  }

  &__required {
    position: absolute;
    right: calc(~'100% + 5px');
    top: 50%;
    transform: translateY(-50%);
    color: #c0c4cc;
  }

  &.has {
    input {
      border-color: var(--primary);
    }

    .input-label__required {
      color: var(--primary);
    }

    .input-label__tip {
      .active();
    }
  }

  &.disabled {
    input {
      border-color: var(--gray_4);
      color: var(--gray_4);
    }

    .input-label__required {
      color: var(--gray_4);
    }

    .input-label__tip {
      color: var(--gray_4);
    }
  }
}
